/////////////////////////////////////////////////////////////////////////
///@file HTFTSTraderAPI.h
///@brief 定义股票极速柜台交易API接口请求
///@author
///@date
/////////////////////////////////////////////////////////////////////////

#pragma once

#include "HTFTSTraderAPIStruct.h"
#include "HTFTSTraderAPIError.h"

#ifdef _WIN32
#ifdef LIB_HT_TRADER_API_EXPORT
#define HT_TRADER_API_EXPORT __declspec(dllexport)
#else
#define HT_TRADER_API_EXPORT __declspec(dllimport)
#endif
#else
#define HT_TRADER_API_EXPORT
#endif

namespace HTFTS
{
    class HTFTSTraderSPI;

    class HT_TRADER_API_EXPORT HTFTSTraderAPI
    {
    public:
        /*----------------管理类接口BEGIN----------------------------------*/
        /// @brief 创建API类
        /// @param pszFlowPath 数据流文件存放目录
        /// @return 返回HTFTSTraderAPI对象
        static HTFTSTraderAPI* CreateTraderAPI(const char* config_path = "config.ini");

        /// @brief销毁api类
        /// @param api  api实例
        /// 该函数与CreateTraderAPI要配对使用
        static void DestroyTraderAPI(HTFTSTraderAPI*& api);

        /// @brief 查询api版本
        /// @return 返回API的版本号
        virtual const char * GetApiVersion() = 0;

        /// @brief  dump 所有api内存库
        /// 调试接口
        /// 务必在技术人员指导下使用, 勿擅自调用
        /// @return 0：调用成功；其他值：调用失败的tableId
        virtual int DumpAllApiTable() = 0;

        /// @brief  连接授权服务器
        /// @param  serverIp                              授权服务器的地址
        /// @param  serverPort                              授权服务端口
        /// @param  userId                                  客户号
        /// @param  pSpi                                  应答实例
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnConnected                           通信连接时回调
        /// @see    OnDisconnected                        通信连接时回调
        virtual APIResult ConnectServer(HTFTSTraderSPI* pSpi) = 0;

        /// @brief  查询系统信息
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQrySysInfo                       系统信息请求应答
        virtual APIResult ReqQrySysInfo(RequestIDType reqId) = 0;

        /// @brief  查询系统交易日期(同步回调)
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQrySysTradeDateInfo               查询系统交易日期应答
        virtual APIResult ReqQrySysTradeDate(RequestIDType reqId) = 0;
        /*----------------管理类接口END  ----------------------------------*/





        /*----------------改密登录类接口BEGIN----------------------------------*/
        /// @brief 登录
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspUserLogin                        登录请求应答
        /// @see    OnRspHolderNoField                    股东代码返回信息
        /// @see    OnRtnSubscribe                        私有流订阅成功推送
        virtual APIResult ReqUserLogin(ReqUserLoginField* pReqUserLogin, RequestIDType reqId) = 0;

        /// @brief 登出
        /// @param  pUser                                  登出请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspUserLogout                       登出请求应答
        virtual APIResult ReqUserLogout(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief 修改密码请求(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pUserPasswordUpdate                    修改密码请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspUserPasswordUpdate               修改密码应答
        virtual APIResult ReqUserPasswordUpdate(ReqUser *pUser, ReqUserPasswordUpdateField* pUserPasswordUpdate, RequestIDType reqId) = 0;
        /*----------------改密登录类接口END  ----------------------------------*/





        /*----------------公共信息类接口BEGIN----------------------------------*/
        /// @brief ETF查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryETFStatus                      ETF查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryETFStatus                     ETF查询应答
        virtual APIResult ReqQryETFStatus(ReqUser *pUser, ReqQryETFStatusField* pReqQryETFStatus, RequestIDType reqId) = 0;

        /// @brief ETF篮子查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryETFBasketComponent              ETF篮子查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryETFBasketComponent            ETF篮子查询应答
        virtual APIResult ReqQryETFBasketComponent(ReqUser *pUser, ReqQryETFBasketComponentField* pReqQryETFBasketComponent, RequestIDType reqId) = 0;

        /// @brief  证券基础信息查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQrySecField                       查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspSecInfo                          证券信息查询应答
        virtual APIResult ReqQrySecInfo(ReqUser *pUser, ReqQrySecField* pReqQrySecField, RequestIDType reqId) = 0;

        /// @brief  查询信用标的信息(同步回调)
        /// @param  pReqQryCreditUnderlyingStockField     查询标的信息请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditUnderlyingStock         查询信用标的信息应答
        virtual APIResult ReqQryCreditUnderlyingStock(ReqUser *pUser, ReqQryCreditUnderlyingStockField* pReqQryCreditUnderlyingStockField, RequestIDType reqId) = 0;

        /// @brief  查询投票股东大会议案信息(同步回调)
        /// @param  pReqQryCreditUnderlyingStockField     查询投票股东大会议案信息请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspVoteShareHolderMeetingInfo         查询投票股东大会议案信息应答
        virtual APIResult ReqQryVoteShareHolderMeetingInfo(ReqUser *pUser, ReqQryVoteShareHolderMeetingInfoField* pReqQryVoteShareHolderMeetingInfoField, RequestIDType reqId) = 0;

        /// @brief 要约收购人信息查询请求接口(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryTendererInfo                   要约收购人信息查询应答
        virtual APIResult ReqQryTendererInfo(ReqUser *pUser, ReqQryTendererInfoField *pReqQryTendererInfoField, RequestIDType reqId) = 0;

        /// @brief RTGS日间入账流水查询（HOTS）(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryRTGS                           RTGS日间入账流水查询应答
        virtual APIResult ReqQryRTGS(ReqUser *pUser, ReqQryRTGSField *pReqQryRTGSField, RequestIDType reqId) = 0;

        /*----------------公共信息类接口END  ----------------------------------*/





        /*----------------普通交易类接口BEGIN----------------------------------*/
        /// @brief 委托(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqSingleOrderInsert                  委托请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnOrder                            报单推送
        /// @see    OnRtnOrderExecution                   委托成交推送
        virtual APIResult ReqSingleOrderInsert(ReqUser *pUser, ReqSingleOrderInsertField* pReqSingleOrderInsert, RequestIDType reqId) = 0;

        /// @brief ETF申赎(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqETFOrderInsert                      ETF申赎请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnOrder                            报单推送
        /// @see    OnRtnOrderExecution                   委托成交推送
        virtual APIResult ReqETFOrderInsert(ReqUser *pUser, ReqETFOrderInsertField* pReqETFOrderInsert, RequestIDType reqId) = 0;

        /// @brief 撤单(异步回调)
        ///         支持两种撤单方式： 1）：orderId；  2）：sessionId + orderRef；注：只要orderRef > 0，默认使用方式2撤单
        ///         注：股转撤单只支持按合同号方式1撤单
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqSingleOrderCancel                  撤单请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnOrder                            报单推送
        virtual APIResult ReqSingleOrderCancel(ReqUser *pUser, ReqSingleOrderCancelField* pReqSingleOrderCancel, RequestIDType reqId) = 0;

        /// @brief  资券变动流水查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryFundStockChange               资券变动流水查询申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryFundStockChange        资券变动流水查询应答
        virtual APIResult ReqQryFundStockChange(ReqUser *pUser, ReqQryFundStockChangeField*pReqQryFundStockChange, RequestIDType reqId) = 0;

        /// @brief  客户当日转账流水查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryBankTransChange               当日转账流水查询申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryBankTransChange        当日转账流水查询应答
        virtual APIResult ReqQryBankTransChange(ReqUser *pUser, ReqQryBankTransChangeField *pReqQryBankTransChange, RequestIDType reqId) = 0;

        /// @brief  HOTS资金内转查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBankTransChangeInward           HOTS资金内转查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryBankTransChangeInward          HOTS资金内转查询应答
        virtual APIResult ReqQryBankTransChangeInward(ReqUser *pUser, ReqQryBankTransChangeInwardField *pReqQryBankTransChangeInward, RequestIDType reqId) = 0;

        /// @brief 资金查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryTradingAccount                  资金查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryAccount                       资金查询应答
        virtual APIResult ReqQryAccount(ReqUser *pUser, ReqQryAccountField* pReqQryTradingAccount, RequestIDType reqId) = 0;

        /// @brief 资金可用查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqCustFundInfoField                  资金查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see  OnRspCustFundInfo                       资金可用查询应答
        virtual APIResult ReqCustFundInfo(ReqUser *pUser, ReqCustFundInfoField* pReqCustFundInfoField, RequestIDType reqId) = 0;

        /// @brief 持仓查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryInvestorPosition                  持仓查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryInvestorPosition              持仓查询应答
        virtual APIResult ReqQryInvestorPosition(ReqUser *pUser, ReqQryInvestorPositionField* pReqQryInvestorPosition, RequestIDType reqId) = 0;

        /// @brief 委托查询(异步回调)
        /// @param  pReqQrySingleOrder                      委托查询请求
        /// @param  pUser                                 发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryOrder                         委托查询应答(单笔委托和批量委托)
        virtual APIResult ReqQrySingleOrder(ReqUser *pUser, ReqQrySingleOrderField* pReqQrySingleOrder, RequestIDType reqId) = 0;

        /// @brief  批量委托查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBatchOrder                      批量委托查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryOrder                          委托查询应答(单笔委托和批量委托)
        virtual APIResult ReqQryBatchOrder(ReqUser *pUser, ReqQryBatchOrderField* pReqQryBatchOrder, RequestIDType reqId) = 0;

        /// @brief 成交查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryTrade                          成交查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryTrade                         成交查询应答
        virtual APIResult ReqQryTrade(ReqUser *pUser, ReqQryTradeField* pReqQryTrade, RequestIDType reqId) = 0;

        /// @brief 查询银行账户信息(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryCustBankAcc                   查询银行账户信息应答
        virtual APIResult ReqQryCustBankAcc(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief  转账请求(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqTransFund 转账请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspFundTrans                         转账申请应答
        virtual APIResult ReqTransFund(ReqUser *pUser, ReqTransFundField* pReqTransFund, RequestIDType reqId) = 0;

        /// @brief  HOTS资金内转请求(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqTransFundInward                    HOTS资金内转请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspFundTrans                         HOTS资金内转请求应答
        virtual APIResult ReqTransFundInward(ReqUser *pUser, ReqTransFundInwardField* pReqTransFundInward, RequestIDType reqId) = 0;

        /// @brief  新股额度查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryNewStockLimitField             查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspNewStockLimit                    新股额度查询应答
        virtual APIResult ReqQryNewStockLimit(ReqUser *pUser, ReqQryNewStockLimitField* pReqQryNewStockLimitField, RequestIDType reqId) = 0;

        /// @brief  股票查询（含当日买卖信息）(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQryStockInfoField                  查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryStockInfo                     股票查询（含当日买卖信息）应答
        virtual APIResult ReqQryStockInfo(ReqUser *pUser, ReqQryStockInfoField* pReqQryStockInfoField, RequestIDType reqId) = 0;

        /// @brief   股票成本价修改(异步回调)
        /// @param    pUser                                  发起请求的客户
        /// @param    ReqModifyStockAveragePriceField        股票成本价修改申请
        /// @param    reqId                                  请求编号
        /// @retval   APIResult                              参考HTTraderAPIError.h
        /// @see      OnRspModifyStockAveragePrice           股票成本价修改应答
        virtual APIResult ReqModifyStockAveragePrice(ReqUser *pUser, ReqModifyStockAveragePriceField*pReqModifyStockAveragePrice, RequestIDType reqId) = 0;

        /// @brief  新股配号查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryNewStockLimitField              查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryIPOMatchNumber                 新股配号询应答
        virtual APIResult ReqQryIPOMatchNumber(ReqUser *pUser, ReqQryIPOMatchNumberField* pReqQryIPOMatchNumberField, RequestIDType reqId) = 0;

        /// @brief  新股中签查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryNewStockLimitField              查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryIPOWinningLot                  新股中签查询应答
        virtual APIResult ReqQryIPOWinningLot(ReqUser *pUser, ReqQryIPOWinningLotField* pReqQryIPOWinningLotField, RequestIDType reqId) = 0;


        /// @brief  查询信用账户与普通账户对应关系(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryUsrAccountRelation			  查询信用账户与普通账户对应关系
        /// @param  reqId		                          请求编号
        /// @retval APIResult							  参考HTTraderAPIError.h
        /// @see    OnRspQryUsrAccountRelation            查询信用账户与普通账户对应关系应答
        virtual APIResult ReqQryUsrAccountRelation(ReqUser *pUser, ReqQryUsrAccountRelationField*pReqQryUsrAccountRelation, RequestIDType reqId) = 0;


        /// @brief  成交汇总查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqDealSummary                       成交汇总查询
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspQryTradeSummary                  成交汇总查询应答
        virtual APIResult ReqQryTradeSummary(ReqUser *pUser, ReqQryTradeSummaryField*pReqTradeSummary, RequestIDType reqId) = 0;

        /// @brief  IPO缴款预冻结资金解冻请求(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqIPOFundUnFrozenField               查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspIPOFundUnFrozen                   IPO缴款预冻结资金解冻应答
        virtual APIResult ReqIPOFundUnFrozen(ReqUser *pUser, ReqIPOFundUnFrozenField* pReqIPOFundUnFrozenField, RequestIDType reqId) = 0;

        /// @brief 债券行情信息查询请求接口(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryBondDeclareQuotes              深圳债券成交申报行情查询应答
        virtual APIResult ReqQryBondDeclareQuotes(ReqUser *pUser, ReqQryBondDeclareQuotesField *pReqQryBondDeclareQuotesField, RequestIDType reqId) = 0;

        /// @brief  全市场ETF申赎成交查询(异步回调)
        /// @param  pUser                               发起请求的客户
        /// @param  pReqQryETFTradeDoneInfo             全市场ETF申赎成交查询请求
        /// @param  reqId                               请求编号
        /// @retval APIResult                           参考HTFTSTraderAPIError.h
        /// @see    OnRspQryETFTradeDoneInfo            ETF申赎成交查询应答
        virtual APIResult ReqQryETFTradeDoneInfo(ReqUser *pUser, ReqQryETFTradeDoneInfoField* pReqQryETFTradeDoneInfo, RequestIDType reqId) = 0;

        /// @brief 综合类债券行情信息查询请求接口(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryBondDeclareQuotes              深圳债券成交申报行情查询应答
        virtual APIResult ReqQryCompositeBondDeclareQuotes(ReqUser *pUser, ReqQryCompositeBondDeclareQuotesField *pReqQryCompositeBondDeclareQuotesField, RequestIDType reqId) = 0;

        /// @brief  场外基金T0最大取现金额查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQryOfsT0MaxWithdrawAmt             查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspQryOfsT0MaxWithdrawAmt           场外基金T0最大取现金额查询应答
        virtual APIResult ReqQryOfsT0MaxWithdrawAmt(ReqUser *pUser, ReqQryOfsT0MaxWithdrawAmtField* pReqQryOfsT0MaxWithdrawAmtField, RequestIDType reqId) = 0;

        /// @brief  查询子账户及资金(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQrySubAccountAndFund               查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    RspQrySubAccountAndFund               查询子账户及资金应答
        virtual APIResult ReqQrySubAccountAndFund(ReqUser *pUser, ReqQrySubAccountAndFundField* pReqQrySubAccountAndFundField, RequestIDType reqId) = 0;

        /// @brief  查询同名辅账户可内转资金(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQrySubAccountTransFundField        查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspSubAccountTransFund              查询同名辅账户可内转资金应答
        virtual APIResult ReqQrySubAccountTransFund(ReqUser *pUser, ReqQrySubAccountTransFundField* pReqQrySubAccountTransFundField, RequestIDType reqId) = 0;

        /// @brief  查询可转资金请求(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQrySubAccountTransFundField        查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspSubAccountTransFund              查询可转资金应答
        virtual APIResult ReqQryAvailableAccount(ReqUser *pUser, ReqQrySubAccountTransFundField* pReqQrySubAccountTransFundField, RequestIDType reqId) = 0;

        /// @brief  同名资金内转请求(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqTransSubInsideFundField           查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspTransSubInsideFund               同名资金内转回报
        virtual APIResult ReqTransSubInsideFund(ReqUser *pUser, ReqTransSubInsideFundField* pReqTransSubInsideFundField, RequestIDType reqId) = 0;

        /// @brief  查询同名内转流水请求(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryTransSubInsideFundField        查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspQryTransSubInsideFund            查询同名内转流水回报
        virtual APIResult ReqQryTransSubInsideFund(ReqUser *pUser, ReqQryTransSubInsideFundField* pReqQryTransSubInsideFundField, RequestIDType reqId) = 0;

        /*----------------普通交易类接口END  ----------------------------------*/





        /*----------------信用交易类接口BEGIN----------------------------------*/
        ///----------------融资融券业务独有接口,  非两融用户勿用----------------------------------
        /// @brief 还款请求(异步回调)
        /// @param  pReqCreditPayBack                     还款请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspCreditPayBack                    还款请求应答
        virtual APIResult ReqCreditPayBack(ReqUser *pUser, ReqCreditPayBackField* pReqCreditPayBack, RequestIDType reqId) = 0;

        /// @brief 查询融券负债(异步回调)
        /// @param  pReqQryCreditPositionField            查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditPosition                融券负债查询应答
        virtual APIResult ReqQryCreditPosition(ReqUser *pUser, ReqQryCreditPositionField* pReqQryCreditPositionField, RequestIDType reqId) = 0;

        /// @brief  查询融券仓单(异步回调)
        /// @param  ReqQryCreditPositionDetailField       查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditPositionDetail          查询融券仓单应答
        virtual APIResult ReqQryCreditPositionDetail(ReqUser *pUser, ReqQryCreditPositionDetailField* pReqQryCreditPositionDetail, RequestIDType reqId) = 0;

        /// @brief 查询融资负债(暂时只支持人民币查询)(异步回调)
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditAccount                 查询融资负债应答
        virtual APIResult ReqQryCreditAccount(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief  查询融资仓单(异步回调)
        /// @param  ReqQryCreditAccountDetailField        查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditAccountDetail           查询融资仓单应答
        virtual APIResult ReqQryCreditAccountDetail(ReqUser *pUser, ReqQryCreditAccountDetailField* pReqQryCreditAccountDetailField, RequestIDType reqId) = 0;

        /// @brief  查询客户信用信息(同步回调)
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryUserCreditInfo                查询客户信用信息应答
        virtual APIResult ReqQryUserCreditInfo(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief  查询客户保底融券额度(同步回调)
        /// @param  pReqQryUserReserveCreditStockField    查询标的信息请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryUserReserveCreditStock        查询客户保底融券额度应答
        virtual APIResult ReqQryUserReserveCreditStock(ReqUser *pUser, ReqQryUserReserveCreditStockField* pReqQryUserReserveCreditStockField, RequestIDType reqId) = 0;

        /// @brief  查询证券公允价格(同步回调)
        /// @param  pReqQrySecurityAssetPriceInfoField    查询证券公允价格请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQrySecurityAssetPriceInfo        查询证券公允价格应答
        virtual APIResult ReqQrySecurityAssetPriceInfo(ReqUser *pUser, ReqQrySecurityAssetPriceInfoField* pReqQrySecurityAssetPriceInfoField, RequestIDType reqId) = 0;

        /// @brief  查询保证金等综合信息(异步回调)
        /// @param  peqQryComprehensiveInfoField          查询保证金等综合信息请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryComprehensiveInfo             查询保证金等综合信息应答
        virtual APIResult ReqQryComprehensiveInfo(ReqUser *pUser, ReqQryComprehensiveInfoField* peqQryComprehensiveInfoField, RequestIDType reqId) = 0;

        /// @brief  融资融券委托试算查询请求(支持批量查询)(异步回调)
        /// @param  ReqQryBatchCreditTradeForTrial       融资融券委托试算查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCreditTradeForTrial            融资融券委托试算查询请求应答
        virtual APIResult ReqQryBatchCreditTradeForTrial(ReqUser *pUser, struct ReqQryBatchCreditTradeForTrialField* pReqQryBatchCreditTradeForTrialField, RequestIDType reqId) = 0;

        /// @brief  专户公共券池数量查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryCmnStkPoolNum                  专户公共券池数量查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCmnStkPoolNum                 专户公共券池数量查询应答
        virtual APIResult ReqQryCmnStkPoolNum(ReqUser *pUser, ReqQryCmnStkPoolNumField*pReqQryCmnStkPoolNum, RequestIDType reqId) = 0;

        /// @brief    融资融券展期(异步回调)
        /// @param    pUser                                  发起请求的客户
        /// @param    ReqReceiptExtendField                  融资融券展期申请
        /// @param    reqId                                  请求编号
        /// @retval   APIResult                              参考HTTraderAPIError.h
        /// @see      OnRspReceiptExtend                     融资融券展期应答
        virtual APIResult ReqReceiptExtend(ReqUser *pUser, ReqReceiptExtendField*pReqReceiptExtend, RequestIDType reqId) = 0;

        /// @brief    仓单变更申请拒绝原因查询(同步回调)
        /// @param    pUser                                  发起请求的客户
        /// @param    ReqQryExtendApplyRejectReasonField       仓单变更申请拒绝原因查询请求
        /// @param    reqId                                  请求编号
        /// @retval   APIResult                              参考HTTraderAPIError.h
        /// @see      OnRspQryExtendApplyRejectReason        仓单变更申请拒绝原因查询应答
        virtual APIResult ReqQryExtendApplyRejectReason(ReqUser *pUser, ReqQryExtendApplyRejectReasonField*pReqQryExtendApplyRejectReason, RequestIDType reqId) = 0;

        /// @brief    仓单变更申请查询(同步回调)
        /// @param    pUser                                  发起请求的客户
        /// @param    ReqQryExtendApplyField                 仓单变更申请查询请求
        /// @param    reqId                                  请求编号
        /// @retval   APIResult                              参考HTTraderAPIError.h
        /// @see      OnRspQryExtendApply                    仓单变更申请查询应答
        virtual APIResult ReqQryExtendApply(ReqUser *pUser, ReqQryExtendApplyField*pReqQryExtendApply, RequestIDType reqId) = 0;

        /// @brief  两地保证金调拨请求接口(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqMarginTransferField                查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspMarginTransfer                      两地保证金调拨应答
        virtual APIResult ReqMarginTransfer(ReqUser *pUser, ReqMarginTransferField* pReqMarginTransferField, RequestIDType reqId) = 0;

        /// @brief  保证金可调拨额度试算请求接口(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryMarginTransferLimit              保证金可调拨额度试算应答
        virtual APIResult ReqQryMarginTransferLimit(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief  保证金历史累计调拨数量查询请求接口(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryMarginTransferChange              保证金历史累计调拨数量查询应答
        virtual APIResult ReqQryMarginTransferChange(ReqUser *pUser, RequestIDType reqId) = 0;

        /// @brief  质押库明细查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryMortgageField                  查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    RspQryMortgage                        质押库明细查询应答
        virtual APIResult ReqQryMortgage(ReqUser *pUser, struct ReqQryMortgageField* pReqQryMortgageField, RequestIDType reqId) = 0;

        /// @brief  回购融资汇总交易查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryRepurchaseCreditField          查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspRepurchaseCredit                 回购融资汇总交易查询应答
        virtual APIResult ReqQryRepurchaseCredit(ReqUser *pUser, struct ReqQryRepurchaseCreditField* pReqQryRepurchaseCreditField, RequestIDType reqId) = 0;

        /// @brief  未购回记录查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  ReqQryUnpurchasedRecordField          查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRspUnpurchasedRecord                未购回记录查询应答
        virtual APIResult ReqQryUnpurchasedRecord(ReqUser *pUser, ReqQryUnpurchasedRecordField*peqQryUnpurchasedRecord, RequestIDType reqId) = 0;

        /// @brief 非交易业务委托(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqMarginNonTradeOrder                非交易业务请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnCompositeTradeOrder               非交易业务报单推送
        virtual APIResult ReqMarginNonTradeOrder(ReqUser *pUser, ReqMarginNonTradeOrderField* pReqMarginNonTradeOrder, RequestIDType reqId) = 0;

        /// @brief  非交易业务撤单(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqMarginNonTradeOrderCancel         非交易业务撤单请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTFTSTraderAPIError.h
        /// @see    OnRtnCompositeTradeOrderCancel        非交易业务报单推送
        virtual APIResult ReqMarginNonTradeOrderCancel(ReqUser *pUser, ReqMarginNonTradeOrderCancelField* pReqMarginNonTradeOrderCancel, RequestIDType reqId) = 0;

        /// @brief  非交易业务委托查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryMarginNonTradeOrder            非交易业务委托查询请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTFTSTraderAPIError.h
        /// @see    RspQryMarginNonTradeOrder             非交易业务查询应答
        virtual APIResult ReqQryMarginNonTradeOrder(ReqUser *pUser, ReqQryMarginNonTradeOrderField* pReqQryMarginNonTradeOrder, RequestIDType reqId) = 0;
        /*----------------信用交易类接口END  ----------------------------------*/





        /*----------------私用券源类接口BEGIN----------------------------------*/
        /// @brief  券源行情查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryStkSrcQuotes                   券源行情查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryStkSrcQuotes                  券源行情查询应答
        virtual APIResult ReqQryStkSrcQuotes(ReqUser *pUser, ReqQryStkSrcQuotesField*pReqQryStkSrcQuotes, RequestIDType reqId) = 0;

        /// @brief  客户锁券申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqLockStkOrder                      客户锁券申请请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnLockStkOrder                     客户锁券申请应答
        virtual APIResult ReqLockStkOrder(ReqUser *pUser, ReqLockStkOrderField *pReqLockStkOrder, RequestIDType reqId) = 0;

        /// @brief  锁券委托查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryLockStkOrder                   锁券委托查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryLockStkOrder                  锁券委托查询应答
        virtual APIResult ReqQryLockStkOrder(ReqUser *pUser, ReqQryLockStkOrderField*pReqQryLockStkOrder, RequestIDType reqId) = 0;

        /// @brief  私用(券源)额度资格查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryPrivateQuotaQuality            私用(券源)额度资格查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryPrivateLimitQualify           私用(券源)额度资格查询应答
        virtual APIResult ReqQryPrivateLimitQualify(ReqUser *pUser, ReqQryPrivateLimitQualifyField*pReqQryPrivateQuotaQuality, RequestIDType reqId) = 0;

        /// @brief  私用券源产品查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryPrivateStkSrcProduct            私用券源产品查询请求
        /// @param  reqId                                   请求编号
        /// @retval APIResult                               参考HTTraderAPIError.h
        /// @see    OnRspQryPrivateStkSrcProduct           私用券源产品查询应答
        virtual APIResult ReqQryPrivateStkSrcProduct(ReqUser *pUser, ReqQryPrivateStkSrcProductField*pReqQryPrivateStkSrcProduct, RequestIDType reqId) = 0;

        /// @brief  最大可预约额度查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryMaxSubscribableLimit           最大可预约额度查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryMaxSubscribableLimit          最大可预约额度查询应答
        virtual APIResult ReqQryMaxSubscribableLimit(ReqUser *pUser, ReqQryMaxSubscribableLimitField*pReqQryMaxSubscribableLimit, RequestIDType reqId) = 0;

        /// @brief  私用券源预约申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqPrivateStkSrcSubscriptionOrder    私用券源预约申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspPrivateStkSrcSubscriptionOrder   私用券源预约申请应答
        virtual APIResult ReqPrivateStkSrcSubscriptionOrder(ReqUser *pUser, ReqPrivateStkSrcSubscriptionOrderField*pReqPrivateStkSrcSubscriptionOrder, RequestIDType reqId) = 0;

        /// @brief  私用券源预约撤单(异步回调)
        /// @param  pUser                                        发起请求的客户
        /// @param  pReqPrivateStkSrcSubscriptionCancle          私用券源预约撤单申请
        /// @param  reqId                                         请求编号
        /// @retval APIResult                                     参考HTTraderAPIError.h
        /// @see    OnRspPrivateStkSrcSubscriptionCancle         私用券源预约撤单应答
        virtual APIResult ReqPrivateStkSrcSubscriptionCancle(ReqUser *pUser, ReqPrivateStkSrcSubscriptionCancleField*pReqPrivateStkSrcSubscriptionCancle, RequestIDType reqId) = 0;

        /// @brief  当日预约申请查询(异步回调)
        /// @param  pUser                                   发起请求的客户
        /// @param  pReqQryCurrentSubscriptionOrder         当日预约申请查询申请
        /// @param  reqId                                    请求编号
        /// @retval APIResult                                参考HTTraderAPIError.h
        /// @see    OnRspQryCurrentSubscriptionOrder        当日预约申请查询应答
        virtual APIResult ReqQryCurrentSubscriptionOrder(ReqUser *pUser, ReqQryCurrentSubscriptionOrderField*pReqQryCurrentSubscriptionOrder, RequestIDType reqId) = 0;

        /// @brief  当日预约成交查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqCurrentSubscriptionDone           当日预约成交查询申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryCurrentSubscriptionDone       当日预约成交查询应答
        virtual APIResult ReqQryCurrentSubscriptionDone(ReqUser *pUser, ReqQryCurrentSubscriptionDoneField*pReqCurrentSubscriptionDone, RequestIDType reqId) = 0;

        /// @brief  未了结预约合约查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryOpenSubscription               未了结预约合约查询申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryUndoneSubscription            未了结预约合约查询应答
        virtual APIResult ReqQryUndoneSubscription(ReqUser *pUser, ReqQryUndoneSubscriptionField*pReqQryOpenSubscription, RequestIDType reqId) = 0;
        /*----------------私用券源类接口END  ----------------------------------*/





        /*----------------大宗交易类接口BEGIN----------------------------------*/
        /// @brief  大宗委托申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqBlockTradeSingleOrderField         大宗委托申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnBlockTradeOrder                  大宗交易委托应答
        virtual APIResult ReqBlockTradeSingleOrder(ReqUser *pUser, ReqBlockTradeSingleOrderField* pReqBlockTradeSingleOrderField, RequestIDType reqId) = 0;

        /// @brief  大宗撤单申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqBlockTradeCancelField              大宗撤单申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnBlockTradeOrder                  大宗交易撤单应答
        virtual APIResult ReqBlockTradeCancel(ReqUser *pUser, ReqBlockTradeCancelField* pReqBlockTradeCancelField, RequestIDType reqId) = 0;

        /// @brief  大宗委托查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryBlockTradeOrderField            大宗委托查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryBlockTradeOrder                  大宗委托查询应答
        virtual APIResult ReqQryBlockTradeOrder(ReqUser *pUser, ReqQryBlockTradeOrderField* pReqQryBlockTradeOrderField, RequestIDType reqId) = 0;

        /// @brief  大宗成交查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBlockTradeField                 大宗成交查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryBlockTrade                       大宗成交查询应答
        virtual APIResult ReqQryBlockTrade(ReqUser *pUser, ReqQryBlockTradeField* pReqQryBlockTradeField, RequestIDType reqId) = 0;

        /// @brief  债券交易参数查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBondTradeParamField             债券交易参数查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryBondTradeParam                 债券交易参数查询应答
        virtual APIResult ReqQryBondTradeParam(ReqUser *pUser, ReqQryBondTradeParamField* pReqQryBondTradeParamField, RequestIDType reqId) = 0;

        /// @brief  固定收益平台债券交易指定对手方报价预估结算金额查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBondTradePredictClrAmtField     债券交易预估结算金额查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryBondTradePredictClrAmt           债券交易预估结算金额查询应答
        virtual APIResult ReqQryBondTradePredictClrAmt(ReqUser *pUser, ReqQryBondTradePredictClrAmtField* pReqQryBondTradePredictClrAmtField, RequestIDType reqId) = 0;

        /// @brief  股转大宗委托申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqNqBlockTradeOrder                 股转大宗委托申请
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRtnCompositeTradeOrder              股转大宗交易委托应答
        /// @see    OnRtnCompositeTradeOrderExecution     股转大宗交易成交应答
        virtual APIResult ReqNqBlockTradeOrder(ReqUser *pUser, ReqNqBlockTradeOrderField* pReqNqBlockTradeOrder, RequestIDType reqId) = 0;

        /// @brief  股转大宗撤单申请(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqNqBlockTradeOrderCancel            股转大宗撤单申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnCompositeTradeOrderCancel         股转大宗交易撤单应答
        virtual APIResult ReqNqBlockTradeOrderCancel(ReqUser *pUser, ReqNqBlockTradeOrderCancelField* pReqNqBlockTradeOrderCancel, RequestIDType reqId) = 0;

        /// @brief  股转大宗委托查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryNqBlockTradeOrder               股转大宗委托查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryNqBlockTradeOrder                股转大宗委托查询应答
        virtual APIResult ReqQryNqBlockTradeOrder(ReqUser *pUser, ReqQryNqBlockTradeOrderField* pReqQryNqBlockTradeOrder, RequestIDType reqId) = 0;

        /// @brief  股转大宗成交查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryNqBlockTradeTrade               股转大宗成交查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryNqBlockTradeTrade                股转大宗成交查询应答
        virtual APIResult ReqQryNqBlockTradeTrade(ReqUser *pUser, ReqQryNqBlockTradeTradeField* pReqQryNqBlockTradeTrade, RequestIDType reqId) = 0;

        /// @brief  两融大宗委托申请(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqBlockTradeSingleOrderField         两融大宗委托申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnXYBlockTradeOrder                 两融大宗交易委托应答
        /// @see    OnRtnXYBlockTradeOrderExecution        两融大宗交易成交应答
        virtual APIResult ReqXYBlockTradeOrder(ReqUser *pUser, ReqXYBlockTradeOrderField* pReqXYBlockTradeOrderField, RequestIDType reqId) = 0;

        /// @brief  两融大宗交易撤单申请(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqXYBlockTradeCancelField            两融大宗交易撤单申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnBlockTradeOrderCancel		       两融大宗撤单应答
        virtual APIResult ReqXYBlockTradeCancel(ReqUser *pUser, ReqBlockTradeCancelField* pReqXYBlockTradeCancelField, RequestIDType reqId) = 0;

        /// @brief  两融大宗委托查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYBlockTradeOrderFieldd         两融大宗委托查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryXYBlockTradeOrder                大宗委托查询应答
        virtual APIResult ReqQryXYBlockTradeOrder(ReqUser *pUser, ReqQryXYBlockTradeOrderField* pReqQryXYBlockTradeOrderField, RequestIDType reqId) = 0;

        /// @brief  深圳债券成交申报委托明细查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQrySZBondTradeOrderField           深圳债券成交申报委托明细查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQrySZBondTradeOrder                 深圳债券成交申报委托明细查询应答
        virtual APIResult ReqQrySZBondTradeOrder(ReqUser *pUser, ReqQrySZBondTradeOrderField* pReqQrySZBondTradeOrderField, RequestIDType reqId) = 0;

        /// @brief  两融大宗交易当日成交查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryBlockTradeField				   两融大宗交易当日成交查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryXYBlockTrade					   两融大宗交易当日成交查询应答
        virtual APIResult ReqQryXYBlockTrade(ReqUser *pUser, ReqQryBlockTradeField* pReqQryBlockTradeField, RequestIDType reqId) = 0;

        /// @brief  综合行情查询(异步查询)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYQuotationField                综合行情查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryXYQuotation                    综合行情查询应答
        virtual APIResult ReqQryXYQuotation(ReqUser *pUser, ReqQryXYQuotationField* pReqQryXYQuotationField, RequestIDType reqId) = 0;

        /// @brief  大宗减持受限股份信息查询(异步查询)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryReduceStockField                大宗减持受限股份信息查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryReduceStock                    大宗减持受限股份信息查询应答
        virtual APIResult ReqQryReduceStock(ReqUser *pUser, ReqQryReduceStockField* pReqQryReduceStockField, RequestIDType reqId) = 0;

        /// @brief  综合类(非竞价类)委托试算查询请求(支持批量查询)(异步回调)
        /// @param  pUser                                    发起请求的客户
        /// @param  ReqQryCompositeBatchCreditTradeForTrial  综合类(非竞价类)委托试算查询请求
        /// @param  reqId                                    请求编号
        /// @retval APIResult                                参考HTTraderAPIError.h
        /// @see    OnRspQryCreditTradeForTrial              融资融券委托试算查询请求应答
        virtual APIResult ReqQryCompositeBatchCreditTradeForTrial(ReqUser *pUser, struct ReqQryCompositeBatchCreditTradeForTrialField* pReqQryCompositeBatchCreditTradeForTrialField, RequestIDType reqId) = 0;

        /*----------------大宗交易类接口END  ----------------------------------*/



        /*----------------港股通类接口BEGIN----------------------------------*/
        /// @brief  港股委托(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqHKSingleOrder                      港股委托申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnHKOrder                          委托应答
        virtual APIResult ReqHKSingleOrder(ReqUser *pUser, ReqHKSingleOrderField* pReqHKSingleOrder, RequestIDType reqId) = 0;

        /// @brief  港股撤单(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqHKOrderCancel                     港股撤单请求
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTFTSTraderAPIError.h
        /// @see    OnRtnHKOrder                          报单推送应答
        virtual APIResult ReqHKOrderCancel(ReqUser *pUser, ReqHKOrderCancelField* pReqHKOrderCancel, RequestIDType reqId) = 0;

        /// @brief  港股委托查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryHKOrder                         港股委托查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    RspQryHKOrder                         委托查询应答
        virtual APIResult ReqQryHKOrder(ReqUser *pUser, ReqQryHKOrderField* pReqQryHKOrder, RequestIDType reqId) = 0;

        /// @brief 港股当日成交查询(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQryHKTrade                          成交查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryHKTrade                         成交查询应答
        virtual APIResult ReqQryHKTrade(ReqUser *pUser, ReqQryHKTradeField* pReqHKQryTrade, RequestIDType reqId) = 0;

        /// @brief 港股汇率查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pQryHKExchangeCurrency                  汇率查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryHKExchangeCurrency                汇率查询应答
        virtual APIResult ReqQryHKExchangeCurrency(ReqUser *pUser, ReqQryHKExchangeCurrencyField* pQryHKExchangeCurrency, RequestIDType reqId) = 0;

        /// @brief 港股最小价差信息查询(同步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pQryHKSpreadingInfo                   最小价差查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryHKSpreadingInfo                  最小价差查询应答
        virtual APIResult ReqQryHKSpreadingInfo(ReqUser *pUser, ReqQryHKSpreadingInfoField* pQryHKSpreadingInfo, RequestIDType reqId) = 0;

        /// @brief  港股非交易委托/撤单(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqHKNonTradeOrder                    港股非交易委托/撤单申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRtnHKNonTradeOrder                   港股非交易委托/撤单应答
        virtual APIResult ReqHKNonTradeOrder(ReqUser *pUser, ReqHKNonTradeOrderField* pReqHKNonTradeOrder, RequestIDType reqId) = 0;
        /*----------------港股通类接口END----------------------------------*/

        /*----------------OTC业务类接口BEGIN----------------------------------*/
        /// @brief  OTC委托/预委托(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqOTCSingleOrderField                OTC委托请求请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnOTCOrder                          OTC委托回报
        virtual APIResult ReqOTCSingleOrder(ReqUser *pUser, ReqOTCSingleOrderField* pReqOTCSingleOrderField, RequestIDType reqId) = 0;

        /// @brief  OTC撤单/预撤单(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqOTCOrderCancelField                OTC委托撤单请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnOTCOrder                          OTC委托回报
        virtual APIResult ReqOTCOrderCancel(ReqUser *pUser, ReqOTCOrderCancelField *pReqOTCOrderCancelField, RequestIDType reqId) = 0;

        /// @brief  OTC委托查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryOTCOrder                        OTC委托查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryOTCOrder                         OTC委托查询应答
        virtual APIResult ReqQryOTCOrder(ReqUser *pUser, ReqQryOTCOrderField* pReqQryOTCOrder, RequestIDType reqId) = 0;

        /// @brief  OTC成交查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqOTCQryTrade                        OTC成交查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryOTCTrade                         OTC成交查询应答
        virtual APIResult ReqQryOTCTrade(ReqUser *pUser, ReqQryOTCTradeField* pReqOTCQryTrade, RequestIDType reqId) = 0;
        /*----------------OTC业务类接口END----------------------------------*/

        /*----------------股权激励业务类接口BEGIN----------------------------------*/
        /// @brief  股权激励自主行权委托申报
        /// @param  pUser													发起请求的客户
        /// @param  pReqGQJLOrder                                           股权激励自主行权委托申报
        /// @param  reqId													请求编号
        /// @retval APIResult												参考HTFTSTraderAPIError.h
        /// @see    OnRspGQJLOrder				                            股权激励自主行权委托申报应答
        virtual APIResult ReqGQJLOrder(ReqUser* pUser, ReqGQJLOrderField* pReqGQJLOrder, RequestIDType reqId) = 0;
        /*----------------股权激励业务类接口END----------------------------------*/

        /*----------------报价回购业务类接口BEGIN----------------------------------*/
        /// @brief  报价回购委托申请(异步回调)
        /// @param  pUser                                 发起请求的客户
        /// @param  pReqQuoteRepurchaseOrder              报价回购委托申请
        /// @param  reqId                                 请求编号
        /// @retval APIResult                             参考HTTraderAPIError.h
        /// @see    OnRtnQuoteRepurchaseOrder               报价回购委托应答
        /// @see    OnRtnQuoteRepurchaseOrderExecution      报价回购成交应答
        virtual APIResult ReqQuoteRepurchaseOrder(ReqUser* pUser, ReqQuoteRepurchaseOrderField* pReqQuoteRepurchaseOrder, RequestIDType reqId) = 0;

        /// @brief  报价回购撤单申请(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQuoteRepurchaseOrderCancel         报价回购撤单申请
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnQuoteRepurchaseOrderCancel        报价回购撤单应答
        virtual APIResult ReqQuoteRepurchaseOrderCancel(ReqUser *pUser, ReqQuoteRepurchaseOrderCancelField *pReqQuoteRepurchaseOrderCancel, RequestIDType reqId) = 0;

        /// @brief  报价回购当日委托查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryQuoteCurrentEntrust             报价回购当日委托查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteCurrentEntrust              报价回购当日委托查询应答
        virtual APIResult ReqQryQuoteCurrentEntrust(ReqUser * pUser, ReqQryQuoteCurrentEntrustField * pReqQryQuoteCurrentEntrust, RequestIDType reqId) = 0;

        /// @brief  未到期报价回购查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryQuoteRepurchase                 未到期报价回购查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteRepurchase				   未到期报价回购查询应答
        virtual APIResult ReqQryQuoteRepurchase(ReqUser * pUser, ReqQryQuoteRepurchaseField * pReqQryQuoteRepurchase, RequestIDType reqId) = 0;

        /// @brief  报价回购大额提前购回预约查询(异步回调)
        /// @param  pUser													发起请求的客户
        /// @param  pReqQryQuoteLargeAmtEarlyeRepurchaseSubscrib            报价回购大额提前购回预约查询
        /// @param  reqId													请求编号
        /// @retval APIResult												参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteLargeAmtEarlyeRepurchaseSubscrib				报价回购大额提前购回预约查询应答
        virtual APIResult ReqQryQuoteLargeAmtEarlyeRepurchaseSubscrib(ReqUser * pUser, ReqQryQuoteLargeAmtEarlyeRepurchaseSubscribField * pReqQryQuoteLargeAmtEarlyeRepurchaseSubscrib, RequestIDType reqId) = 0;

        /// @brief  报价回购大额提前购回预约撤销查询(异步回调)
        /// @param  pUser													发起请求的客户
        /// @param  pReqQryQuoteLargeAmtEarlyeRepurchaseSubscribCancel      报价回购大额提前购回预约撤销查询
        /// @param  reqId													请求编号
        /// @retval APIResult												参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteLargeAmtEarlyeRepurchaseSubscribCancel       报价回购大额提前购回预约撤销查询应答
        virtual APIResult ReqQryQuoteLargeAmtEarlyeRepurchaseSubscribCancel(ReqUser * pUser, ReqQryQuoteLargeAmtEarlyeRepurchaseSubscribCancelField * pReqQryQuoteLargeAmtEarlyeRepurchaseSubscribCancel, RequestIDType reqId) = 0;

        /// @brief  报价回购分段利率查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryQuoteGradeRate				   报价回购分段利率查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteGradeRate				   报价回购分段利率查询应答
        virtual APIResult ReqQryQuoteGradeRate(ReqUser * pUser, ReqQryQuoteGradeRateField * pReqQryQuoteGradeRate, RequestIDType reqId) = 0;

        /// @brief  报价回购产品查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryQuoteProd					   报价回购产品查询
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryQuoteProd					   报价回购产品查询应答
        virtual APIResult ReqQryQuoteProd(ReqUser * pUser, ReqQryQuoteProdField * pReqQryQuoteProd, RequestIDType reqId) = 0;

        /*----------------报价回购业务类接口END----------------------------------*/

        /*----------------协议回购类接口BEGIN----------------------------------*/
        /// @brief  协议回购委托(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqXYHGTradeSingleOrderField          协议回购委托请求请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnXYHGTradeOrder                    协议回购委托回报
        /// @see    OnRtnXYHGTradeExcute                   协议回购成交回报
        virtual APIResult ReqXYHGTradeSingleOrder(ReqUser *pUser, ReqXYHGTradeSingleOrderField* pReqXYHGTradeSingleOrderField, RequestIDType reqId) = 0;

        /// @brief  协议回购撤单(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqXYHGTradeSingleOrderCancelField    协议回购撤单请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnXYHGTradeOrderCancel              协议回购撤单回报
        virtual APIResult ReqXYHGTradeSingleOrderCancel(ReqUser *pUser, ReqXYHGTradeSingleOrderCancelField* pReqXYHGTradeSingleOrderCancelField, RequestIDType reqId) = 0;

        /// @brief  协议回购委托查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYHGTradeOrderField             协议回购委托查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryXYHGTradeOrder                   协议回购委托查询应答
        virtual APIResult ReqQryXYHGTradeOrder(ReqUser *pUser, ReqQryXYHGTradeOrderField* pReqQryXYHGTradeOrderField, RequestIDType reqId) = 0;

        /// @brief  协议回购成交查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYHGTradeField                  协议回购成交查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryXYHGTrade                        协议回购成交查询应答
        virtual APIResult ReqQryXYHGTrade(ReqUser *pUser, ReqQryXYHGTradeField* pReqQryXYHGTradeField, RequestIDType reqId) = 0;

        /// @brief  协议回购非公开行情查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYHGUnopenQuatationField        协议回购非公开行情查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryXYHGUnopenQuatation            协议回购非公开行情查询应答
        virtual APIResult ReqQryXYHGUnopenQuatation(ReqUser *pUser, ReqQryXYHGUnopenQuatationField* pReqQryXYHGUnopenQuatationField, RequestIDType reqId) = 0;

        /// @brief  未结算协议回购查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYHGUnSettleBondField           未结算协议回购查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryXYHGUnSettleBond               未结算协议回购查询应答
        virtual APIResult ReqQryXYHGUnSettleBond(ReqUser *pUser, ReqQryXYHGUnSettleBondField* pReqQryXYHGUnSettleBondField, RequestIDType reqId) = 0;

        /// @brief  协议回购委托试算查询请求(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  ReqQryXYHGTradeForTrial                协议回购委托试算查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTTraderAPIError.h
        /// @see    OnRspQryXYHGTradeForTrial              协议回购委托试算查询应答
        virtual APIResult ReqQryXYHGTradeForTrial(ReqUser *pUser, ReqQryXYHGTradeForTrialField* pReqQryXYHGTradeForTrialField, RequestIDType reqId) = 0;

        /// @brief  超长分包数据查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryCompositeEntrustMemoExField     超长分包数据查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryCompositeEntrustMemoEx           超长分包数据查询应答
        virtual APIResult ReqQryCompositeEntrustMemoEx(ReqUser *pUser, ReqQryCompositeEntrustMemoExField* pReqQryCompositeEntrustMemoExField, RequestIDType reqId) = 0;

        /// @brief  协议回购行情扩展备注查询(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryXYHGQuatationMemoExField        协议回购行情扩展备注查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRspQryXYHGQuatationMemoEx            协议回购行情扩展备注查询应答
        virtual APIResult ReqQryXYHGQuatationMemoEx(ReqUser *pUser, ReqQryXYHGQuatationMemoExField* pReqQryXYHGQuatationMemoExField, RequestIDType reqId) = 0;
        /*----------------协议回购类接口END----------------------------------*/

        /*----------------综合类业务接口BEGIN----------------------------------*/

        /// @brief  综合类委托(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqCompositeEntrustOrderField         综合类委托请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnCompositeEntrustOrder             综合类委托回报
        virtual APIResult ReqCompositeEntrustOrder(ReqUser *pUser, ReqCompositeEntrustOrderField* pReqCompositeEntrustOrderField, RequestIDType reqId) = 0;

        /// @brief  综合类撤单(异步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqCompositeEntrustCancelField        综合类撤单请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    OnRtnCompositeEntrustCancel            综合类撤单回报
        virtual APIResult ReqCompositeEntrustCancel(ReqUser *pUser, ReqCompositeEntrustCancelField* pReqCompositeEntrustCancelField, RequestIDType reqId) = 0;

        /// @brief  综合类委托查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryCompositeEntrustOrderField      综合类委托查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryCompositeEntrustOrder            综合类委托查询应答
        virtual APIResult ReqQryCompositeEntrustOrder(ReqUser *pUser, ReqQryCompositeEntrustOrderField* pReqQryCompositeEntrustOrderField, RequestIDType reqId) = 0;

        /// @brief  客户担保品设置查询(同步回调)
        /// @param  pUser                                  发起请求的客户
        /// @param  pReqQryCustGuaranteeSettingField       客户担保品设置查询请求
        /// @param  reqId                                  请求编号
        /// @retval APIResult                              参考HTFTSTraderAPIError.h
        /// @see    RspQryCustGuaranteeSetting             客户担保品设置查询应答
        virtual APIResult ReqQryCustGuaranteeSetting(ReqUser *pUser, ReqQryCustGuaranteeSettingField* pReqQryCustGuaranteeSettingField, RequestIDType reqId) = 0;
        /*----------------综合类业务接口END----------------------------------*/
    protected:
        virtual ~HTFTSTraderAPI() = default;
    };
}


